Integrand size = 23, antiderivative size = 242 \[ \int (c+d x)^3 \sec (a+b x) \sin (3 a+3 b x) \, dx=\frac {3 d^3 x}{2 b^3}-\frac {(c+d x)^3}{b}-\frac {i (c+d x)^4}{4 d}+\frac {(c+d x)^3 \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac {3 i d (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b^2}+\frac {3 d^2 (c+d x) \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{2 b^3}+\frac {3 i d^3 \operatorname {PolyLog}\left (4,-e^{2 i (a+b x)}\right )}{4 b^4}-\frac {3 d^3 \cos (a+b x) \sin (a+b x)}{2 b^4}+\frac {3 d (c+d x)^2 \cos (a+b x) \sin (a+b x)}{b^2}-\frac {3 d^2 (c+d x) \sin ^2(a+b x)}{b^3}+\frac {2 (c+d x)^3 \sin ^2(a+b x)}{b} \]
[Out]
Time = 0.50 (sec) , antiderivative size = 242, normalized size of antiderivative = 1.00, number of steps used = 19, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.565, Rules used = {4516, 4489, 3392, 32, 2715, 8, 4492, 3800, 2221, 2611, 6744, 2320, 6724} \[ \int (c+d x)^3 \sec (a+b x) \sin (3 a+3 b x) \, dx=\frac {3 i d^3 \operatorname {PolyLog}\left (4,-e^{2 i (a+b x)}\right )}{4 b^4}-\frac {3 d^3 \sin (a+b x) \cos (a+b x)}{2 b^4}+\frac {3 d^2 (c+d x) \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{2 b^3}-\frac {3 d^2 (c+d x) \sin ^2(a+b x)}{b^3}-\frac {3 i d (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b^2}+\frac {3 d (c+d x)^2 \sin (a+b x) \cos (a+b x)}{b^2}+\frac {(c+d x)^3 \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {2 (c+d x)^3 \sin ^2(a+b x)}{b}+\frac {3 d^3 x}{2 b^3}-\frac {(c+d x)^3}{b}-\frac {i (c+d x)^4}{4 d} \]
[In]
[Out]
Rule 8
Rule 32
Rule 2221
Rule 2320
Rule 2611
Rule 2715
Rule 3392
Rule 3800
Rule 4489
Rule 4492
Rule 4516
Rule 6724
Rule 6744
Rubi steps \begin{align*} \text {integral}& = \int \left (3 (c+d x)^3 \cos (a+b x) \sin (a+b x)-(c+d x)^3 \sin ^2(a+b x) \tan (a+b x)\right ) \, dx \\ & = 3 \int (c+d x)^3 \cos (a+b x) \sin (a+b x) \, dx-\int (c+d x)^3 \sin ^2(a+b x) \tan (a+b x) \, dx \\ & = \frac {3 (c+d x)^3 \sin ^2(a+b x)}{2 b}-\frac {(9 d) \int (c+d x)^2 \sin ^2(a+b x) \, dx}{2 b}+\int (c+d x)^3 \cos (a+b x) \sin (a+b x) \, dx-\int (c+d x)^3 \tan (a+b x) \, dx \\ & = -\frac {i (c+d x)^4}{4 d}+\frac {9 d (c+d x)^2 \cos (a+b x) \sin (a+b x)}{4 b^2}-\frac {9 d^2 (c+d x) \sin ^2(a+b x)}{4 b^3}+\frac {2 (c+d x)^3 \sin ^2(a+b x)}{b}+2 i \int \frac {e^{2 i (a+b x)} (c+d x)^3}{1+e^{2 i (a+b x)}} \, dx-\frac {(3 d) \int (c+d x)^2 \sin ^2(a+b x) \, dx}{2 b}-\frac {(9 d) \int (c+d x)^2 \, dx}{4 b}+\frac {\left (9 d^3\right ) \int \sin ^2(a+b x) \, dx}{4 b^3} \\ & = -\frac {3 (c+d x)^3}{4 b}-\frac {i (c+d x)^4}{4 d}+\frac {(c+d x)^3 \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac {9 d^3 \cos (a+b x) \sin (a+b x)}{8 b^4}+\frac {3 d (c+d x)^2 \cos (a+b x) \sin (a+b x)}{b^2}-\frac {3 d^2 (c+d x) \sin ^2(a+b x)}{b^3}+\frac {2 (c+d x)^3 \sin ^2(a+b x)}{b}-\frac {(3 d) \int (c+d x)^2 \, dx}{4 b}-\frac {(3 d) \int (c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right ) \, dx}{b}+\frac {\left (3 d^3\right ) \int \sin ^2(a+b x) \, dx}{4 b^3}+\frac {\left (9 d^3\right ) \int 1 \, dx}{8 b^3} \\ & = \frac {9 d^3 x}{8 b^3}-\frac {(c+d x)^3}{b}-\frac {i (c+d x)^4}{4 d}+\frac {(c+d x)^3 \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac {3 i d (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b^2}-\frac {3 d^3 \cos (a+b x) \sin (a+b x)}{2 b^4}+\frac {3 d (c+d x)^2 \cos (a+b x) \sin (a+b x)}{b^2}-\frac {3 d^2 (c+d x) \sin ^2(a+b x)}{b^3}+\frac {2 (c+d x)^3 \sin ^2(a+b x)}{b}+\frac {\left (3 i d^2\right ) \int (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right ) \, dx}{b^2}+\frac {\left (3 d^3\right ) \int 1 \, dx}{8 b^3} \\ & = \frac {3 d^3 x}{2 b^3}-\frac {(c+d x)^3}{b}-\frac {i (c+d x)^4}{4 d}+\frac {(c+d x)^3 \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac {3 i d (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b^2}+\frac {3 d^2 (c+d x) \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{2 b^3}-\frac {3 d^3 \cos (a+b x) \sin (a+b x)}{2 b^4}+\frac {3 d (c+d x)^2 \cos (a+b x) \sin (a+b x)}{b^2}-\frac {3 d^2 (c+d x) \sin ^2(a+b x)}{b^3}+\frac {2 (c+d x)^3 \sin ^2(a+b x)}{b}-\frac {\left (3 d^3\right ) \int \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right ) \, dx}{2 b^3} \\ & = \frac {3 d^3 x}{2 b^3}-\frac {(c+d x)^3}{b}-\frac {i (c+d x)^4}{4 d}+\frac {(c+d x)^3 \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac {3 i d (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b^2}+\frac {3 d^2 (c+d x) \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{2 b^3}-\frac {3 d^3 \cos (a+b x) \sin (a+b x)}{2 b^4}+\frac {3 d (c+d x)^2 \cos (a+b x) \sin (a+b x)}{b^2}-\frac {3 d^2 (c+d x) \sin ^2(a+b x)}{b^3}+\frac {2 (c+d x)^3 \sin ^2(a+b x)}{b}+\frac {\left (3 i d^3\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(3,-x)}{x} \, dx,x,e^{2 i (a+b x)}\right )}{4 b^4} \\ & = \frac {3 d^3 x}{2 b^3}-\frac {(c+d x)^3}{b}-\frac {i (c+d x)^4}{4 d}+\frac {(c+d x)^3 \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac {3 i d (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b^2}+\frac {3 d^2 (c+d x) \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{2 b^3}+\frac {3 i d^3 \operatorname {PolyLog}\left (4,-e^{2 i (a+b x)}\right )}{4 b^4}-\frac {3 d^3 \cos (a+b x) \sin (a+b x)}{2 b^4}+\frac {3 d (c+d x)^2 \cos (a+b x) \sin (a+b x)}{b^2}-\frac {3 d^2 (c+d x) \sin ^2(a+b x)}{b^3}+\frac {2 (c+d x)^3 \sin ^2(a+b x)}{b} \\ \end{align*}
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(1730\) vs. \(2(242)=484\).
Time = 6.36 (sec) , antiderivative size = 1730, normalized size of antiderivative = 7.15 \[ \int (c+d x)^3 \sec (a+b x) \sin (3 a+3 b x) \, dx=\frac {i c d^2 e^{-i a} \left (2 b^2 x^2 \left (2 b x-3 i \left (1+e^{2 i a}\right ) \log \left (1+e^{-2 i (a+b x)}\right )\right )+6 b \left (1+e^{2 i a}\right ) x \operatorname {PolyLog}\left (2,-e^{-2 i (a+b x)}\right )-3 i \left (1+e^{2 i a}\right ) \operatorname {PolyLog}\left (3,-e^{-2 i (a+b x)}\right )\right ) \sec (a)}{4 b^3}+\frac {i d^3 e^{i a} \left (2 b^4 e^{-2 i a} x^4-4 i b^3 \left (1+e^{-2 i a}\right ) x^3 \log \left (1+e^{-2 i (a+b x)}\right )+6 b^2 \left (1+e^{-2 i a}\right ) x^2 \operatorname {PolyLog}\left (2,-e^{-2 i (a+b x)}\right )-6 i b \left (1+e^{-2 i a}\right ) x \operatorname {PolyLog}\left (3,-e^{-2 i (a+b x)}\right )-3 \left (1+e^{-2 i a}\right ) \operatorname {PolyLog}\left (4,-e^{-2 i (a+b x)}\right )\right ) \sec (a)}{8 b^4}+\frac {c^3 \sec (a) (\cos (a) \log (\cos (a) \cos (b x)-\sin (a) \sin (b x))+b x \sin (a))}{b \left (\cos ^2(a)+\sin ^2(a)\right )}+\frac {3 c^2 d \csc (a) \left (b^2 e^{-i \arctan (\cot (a))} x^2-\frac {\cot (a) \left (i b x (-\pi -2 \arctan (\cot (a)))-\pi \log \left (1+e^{-2 i b x}\right )-2 (b x-\arctan (\cot (a))) \log \left (1-e^{2 i (b x-\arctan (\cot (a)))}\right )+\pi \log (\cos (b x))-2 \arctan (\cot (a)) \log (\sin (b x-\arctan (\cot (a))))+i \operatorname {PolyLog}\left (2,e^{2 i (b x-\arctan (\cot (a)))}\right )\right )}{\sqrt {1+\cot ^2(a)}}\right ) \sec (a)}{2 b^2 \sqrt {\csc ^2(a) \left (\cos ^2(a)+\sin ^2(a)\right )}}+\sec (a) \left (\frac {\cos (2 a+2 b x)}{16 b^4}-\frac {i \sin (2 a+2 b x)}{16 b^4}\right ) \left (-8 b^3 c^3 \cos (a)+12 i b^2 c^2 d \cos (a)+12 b c d^2 \cos (a)-6 i d^3 \cos (a)-24 b^3 c^2 d x \cos (a)+24 i b^2 c d^2 x \cos (a)+12 b d^3 x \cos (a)-24 b^3 c d^2 x^2 \cos (a)+12 i b^2 d^3 x^2 \cos (a)-8 b^3 d^3 x^3 \cos (a)-8 i b^4 c^3 x \cos (a+2 b x)-12 i b^4 c^2 d x^2 \cos (a+2 b x)-8 i b^4 c d^2 x^3 \cos (a+2 b x)-2 i b^4 d^3 x^4 \cos (a+2 b x)+8 i b^4 c^3 x \cos (3 a+2 b x)+12 i b^4 c^2 d x^2 \cos (3 a+2 b x)+8 i b^4 c d^2 x^3 \cos (3 a+2 b x)+2 i b^4 d^3 x^4 \cos (3 a+2 b x)-4 b^3 c^3 \cos (3 a+4 b x)-6 i b^2 c^2 d \cos (3 a+4 b x)+6 b c d^2 \cos (3 a+4 b x)+3 i d^3 \cos (3 a+4 b x)-12 b^3 c^2 d x \cos (3 a+4 b x)-12 i b^2 c d^2 x \cos (3 a+4 b x)+6 b d^3 x \cos (3 a+4 b x)-12 b^3 c d^2 x^2 \cos (3 a+4 b x)-6 i b^2 d^3 x^2 \cos (3 a+4 b x)-4 b^3 d^3 x^3 \cos (3 a+4 b x)-4 b^3 c^3 \cos (5 a+4 b x)-6 i b^2 c^2 d \cos (5 a+4 b x)+6 b c d^2 \cos (5 a+4 b x)+3 i d^3 \cos (5 a+4 b x)-12 b^3 c^2 d x \cos (5 a+4 b x)-12 i b^2 c d^2 x \cos (5 a+4 b x)+6 b d^3 x \cos (5 a+4 b x)-12 b^3 c d^2 x^2 \cos (5 a+4 b x)-6 i b^2 d^3 x^2 \cos (5 a+4 b x)-4 b^3 d^3 x^3 \cos (5 a+4 b x)+8 b^4 c^3 x \sin (a+2 b x)+12 b^4 c^2 d x^2 \sin (a+2 b x)+8 b^4 c d^2 x^3 \sin (a+2 b x)+2 b^4 d^3 x^4 \sin (a+2 b x)-8 b^4 c^3 x \sin (3 a+2 b x)-12 b^4 c^2 d x^2 \sin (3 a+2 b x)-8 b^4 c d^2 x^3 \sin (3 a+2 b x)-2 b^4 d^3 x^4 \sin (3 a+2 b x)-4 i b^3 c^3 \sin (3 a+4 b x)+6 b^2 c^2 d \sin (3 a+4 b x)+6 i b c d^2 \sin (3 a+4 b x)-3 d^3 \sin (3 a+4 b x)-12 i b^3 c^2 d x \sin (3 a+4 b x)+12 b^2 c d^2 x \sin (3 a+4 b x)+6 i b d^3 x \sin (3 a+4 b x)-12 i b^3 c d^2 x^2 \sin (3 a+4 b x)+6 b^2 d^3 x^2 \sin (3 a+4 b x)-4 i b^3 d^3 x^3 \sin (3 a+4 b x)-4 i b^3 c^3 \sin (5 a+4 b x)+6 b^2 c^2 d \sin (5 a+4 b x)+6 i b c d^2 \sin (5 a+4 b x)-3 d^3 \sin (5 a+4 b x)-12 i b^3 c^2 d x \sin (5 a+4 b x)+12 b^2 c d^2 x \sin (5 a+4 b x)+6 i b d^3 x \sin (5 a+4 b x)-12 i b^3 c d^2 x^2 \sin (5 a+4 b x)+6 b^2 d^3 x^2 \sin (5 a+4 b x)-4 i b^3 d^3 x^3 \sin (5 a+4 b x)\right ) \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 647 vs. \(2 (219 ) = 438\).
Time = 2.88 (sec) , antiderivative size = 648, normalized size of antiderivative = 2.68
method | result | size |
risch | \(-\frac {6 i d \,c^{2} x a}{b}-\frac {3 i c \,d^{2} \operatorname {polylog}\left (2, -{\mathrm e}^{2 i \left (x b +a \right )}\right ) x}{b^{2}}+\frac {6 i c \,d^{2} a^{2} x}{b^{2}}+i c^{3} x +\frac {i c^{4}}{4 d}+\frac {c^{3} \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right )}{b}-\frac {2 c^{3} \ln \left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b}-\frac {6 c \,d^{2} a^{2} \ln \left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b^{3}}+\frac {6 c^{2} d a \ln \left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b^{2}}+\frac {3 d \,c^{2} \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right ) x}{b}+\frac {3 c \,d^{2} \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right ) x^{2}}{b}-\frac {3 i d \,c^{2} a^{2}}{b^{2}}-\frac {3 i d^{3} \operatorname {polylog}\left (2, -{\mathrm e}^{2 i \left (x b +a \right )}\right ) x^{2}}{2 b^{2}}+\frac {4 i c \,d^{2} a^{3}}{b^{3}}-\frac {3 i d \,c^{2} \operatorname {polylog}\left (2, -{\mathrm e}^{2 i \left (x b +a \right )}\right )}{2 b^{2}}-\frac {2 i d^{3} a^{3} x}{b^{3}}-i d^{2} c \,x^{3}-\frac {\left (4 d^{3} x^{3} b^{3}+12 b^{3} c \,d^{2} x^{2}+6 i b^{2} d^{3} x^{2}+12 b^{3} c^{2} d x +12 i b^{2} c \,d^{2} x +4 b^{3} c^{3}+6 i b^{2} c^{2} d -6 b \,d^{3} x -6 c \,d^{2} b -3 i d^{3}\right ) {\mathrm e}^{2 i \left (x b +a \right )}}{8 b^{4}}-\frac {\left (4 d^{3} x^{3} b^{3}+12 b^{3} c \,d^{2} x^{2}-6 i b^{2} d^{3} x^{2}+12 b^{3} c^{2} d x -12 i b^{2} c \,d^{2} x +4 b^{3} c^{3}-6 i b^{2} c^{2} d -6 b \,d^{3} x -6 c \,d^{2} b +3 i d^{3}\right ) {\mathrm e}^{-2 i \left (x b +a \right )}}{8 b^{4}}-\frac {3 i d \,c^{2} x^{2}}{2}+\frac {3 c \,d^{2} \operatorname {polylog}\left (3, -{\mathrm e}^{2 i \left (x b +a \right )}\right )}{2 b^{3}}+\frac {d^{3} \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right ) x^{3}}{b}+\frac {3 d^{3} \operatorname {polylog}\left (3, -{\mathrm e}^{2 i \left (x b +a \right )}\right ) x}{2 b^{3}}+\frac {3 i d^{3} \operatorname {polylog}\left (4, -{\mathrm e}^{2 i \left (x b +a \right )}\right )}{4 b^{4}}+\frac {2 d^{3} a^{3} \ln \left ({\mathrm e}^{i \left (x b +a \right )}\right )}{b^{4}}-\frac {3 i d^{3} a^{4}}{2 b^{4}}-\frac {i d^{3} x^{4}}{4}\) | \(648\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1126 vs. \(2 (215) = 430\).
Time = 0.34 (sec) , antiderivative size = 1126, normalized size of antiderivative = 4.65 \[ \int (c+d x)^3 \sec (a+b x) \sin (3 a+3 b x) \, dx=\text {Too large to display} \]
[In]
[Out]
Timed out. \[ \int (c+d x)^3 \sec (a+b x) \sin (3 a+3 b x) \, dx=\text {Timed out} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 444 vs. \(2 (215) = 430\).
Time = 0.34 (sec) , antiderivative size = 444, normalized size of antiderivative = 1.83 \[ \int (c+d x)^3 \sec (a+b x) \sin (3 a+3 b x) \, dx=-\frac {c^{3} {\left (2 \, \cos \left (2 \, b x + 2 \, a\right ) - \log \left (\cos \left (2 \, b x\right )^{2} + 2 \, \cos \left (2 \, b x\right ) \cos \left (2 \, a\right ) + \cos \left (2 \, a\right )^{2} + \sin \left (2 \, b x\right )^{2} - 2 \, \sin \left (2 \, b x\right ) \sin \left (2 \, a\right ) + \sin \left (2 \, a\right )^{2}\right )\right )}}{2 \, b} + \frac {-3 i \, b^{4} d^{3} x^{4} - 12 i \, b^{4} c d^{2} x^{3} - 18 i \, b^{4} c^{2} d x^{2} + 12 i \, d^{3} {\rm Li}_{4}(-e^{\left (2 i \, b x + 2 i \, a\right )}) - 4 \, {\left (-4 i \, b^{3} d^{3} x^{3} - 9 i \, b^{3} c d^{2} x^{2} - 9 i \, b^{3} c^{2} d x\right )} \arctan \left (\sin \left (2 \, b x + 2 \, a\right ), \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) - 6 \, {\left (2 \, b^{3} d^{3} x^{3} + 6 \, b^{3} c d^{2} x^{2} - 3 \, b c d^{2} + 3 \, {\left (2 \, b^{3} c^{2} d - b d^{3}\right )} x\right )} \cos \left (2 \, b x + 2 \, a\right ) - 6 \, {\left (4 i \, b^{2} d^{3} x^{2} + 6 i \, b^{2} c d^{2} x + 3 i \, b^{2} c^{2} d\right )} {\rm Li}_2\left (-e^{\left (2 i \, b x + 2 i \, a\right )}\right ) + 2 \, {\left (4 \, b^{3} d^{3} x^{3} + 9 \, b^{3} c d^{2} x^{2} + 9 \, b^{3} c^{2} d x\right )} \log \left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) + 6 \, {\left (4 \, b d^{3} x + 3 \, b c d^{2}\right )} {\rm Li}_{3}(-e^{\left (2 i \, b x + 2 i \, a\right )}) + 9 \, {\left (2 \, b^{2} d^{3} x^{2} + 4 \, b^{2} c d^{2} x + 2 \, b^{2} c^{2} d - d^{3}\right )} \sin \left (2 \, b x + 2 \, a\right )}{12 \, b^{4}} \]
[In]
[Out]
\[ \int (c+d x)^3 \sec (a+b x) \sin (3 a+3 b x) \, dx=\int { {\left (d x + c\right )}^{3} \sec \left (b x + a\right ) \sin \left (3 \, b x + 3 \, a\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int (c+d x)^3 \sec (a+b x) \sin (3 a+3 b x) \, dx=\int \frac {\sin \left (3\,a+3\,b\,x\right )\,{\left (c+d\,x\right )}^3}{\cos \left (a+b\,x\right )} \,d x \]
[In]
[Out]